package com.atguigu.gmall.ums.api;

import com.atguigu.gmall.common.bean.ResponseVo;
import com.atguigu.gmall.ums.entity.UserAddressEntity;
import com.atguigu.gmall.ums.entity.UserEntity;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;

public interface GmallUmsApi {
    @PostMapping("ums/user/update")
    @ApiOperation("修改")
    public ResponseVo update(@RequestBody UserEntity user);
    @GetMapping("ums/user/{id}")
    @ApiOperation("详情查询")
    public ResponseVo<UserEntity> queryUserById(@PathVariable("id") Long id);
    @ApiOperation("根据userId查询会员的收货地址列表")
    @GetMapping("ums/useraddress/user/{userId}")
    public ResponseVo<List<UserAddressEntity>> queryUserAddress(@PathVariable("userId")Long userId);
    @ApiOperation("查询会员")
    @GetMapping("ums/user/query")
    public ResponseVo<UserEntity> queryUser(@RequestParam("loginName")String loginName,
                                            @RequestParam("password")String password);
}
